Skip to content

IO_Demo benchmarking configuration#232

Open
EdHone wants to merge 20 commits intoMetOffice:mainfrom
EdHone:216-iodemo-bench-vernier
Open

IO_Demo benchmarking configuration#232
EdHone wants to merge 20 commits intoMetOffice:mainfrom
EdHone:216-iodemo-bench-vernier

Conversation

@EdHone
Copy link
Contributor

@EdHone EdHone commented Jan 21, 2026

PR Summary

Sci/Tech Reviewer: @andrewcoughtrie
Code Reviewer: @mo-lucy-gordon

This change introduces a flexible benchmarking configuration for the IO_Demo app. The new functionality enables a user to specify a number of fields to write, along with a number of seconds to wait during a step to mimic simulation time. This simple configuration should enable us to exercise the LFRic I/O capability for a number of different use-cases, including writing data at scale.
The changes include:

  • source changes in io_demo to enable new benchmark capability
  • changes to build the app which enable the use of the sleep() intrinsic for all compilers
  • changes to io_demo metadata which allow the app to be controlled a bit more intuitively
  • tweaks to the io_demo algorithm layer to enable it to be stable at scale
  • tweaks to launch-exe to enable running with XIOS servers in the lfric_core rose-stem
  • new rose-stem tests, along with a new io_demo_benchmark group which runs at large-ish scale (C224)

Code Quality Checklist

(Some checks are automatically carried out via the CI pipeline)

  • I have performed a self-review of my own code
  • My code follows the project's
    style guidelines
  • Comments have been included that aid understanding and enhance the
    readability of the code
  • My changes generate no new warnings

Testing

  • I have tested this change locally, using the LFRic Core rose-stem suite
  • If required (e.g. API changes) I have also run the LFRic Apps test suite
    using this branch
  • If any tests fail (rose-stem or CI) the reason is understood and
    acceptable (e.g. kgo changes)
  • I have added tests to cover new functionality as appropriate (e.g. system
    tests, unit tests, etc.)
  • Any new tests have been assigned an appropriate amount of compute resource
    and have been allocated to an appropriate testing group (i.e. the
    developer tests are for jobs which use a small amount of compute resource
    and complete in a matter of minutes)

trac.log

Test Suite Results - lfric_core - lfric_core-216-iodemo-bench-vernier/run7

Suite Information

Item Value
Suite Name lfric_core-216-iodemo-bench-vernier/run7
Suite User edward.hone
Workflow Start 2026-01-21T10:28:40
Groups Run developer
Dependency Reference Main Like
lfric_core EdHone/lfric_core@216-iodemo-bench-vernier False
SimSys_Scripts MetOffice/SimSys_Scripts@2025.12.1 True

Task Information

✅ succeeded tasks - 377

Test Suite Results - lfric_core - lfric_core-216-iodemo-bench-vernier/run6

Suite Information

Item Value
Suite Name lfric_core-216-iodemo-bench-vernier/run6
Suite User edward.hone
Workflow Start 2026-01-21T10:17:45
Groups Run io_demo_benchmark
Dependency Reference Main Like
lfric_core EdHone/lfric_core@216-iodemo-bench-vernier False
SimSys_Scripts MetOffice/SimSys_Scripts@2025.12.1 True

Task Information

✅ succeeded tasks - 10

Security Considerations

  • I have reviewed my changes for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

Performance Impact

  • Performance of the code has been considered and, if applicable, suitable
    performance measurements have been conducted

AI Assistance and Attribution

  • Some of the content of this change has been produced with the assistance
    of Generative AI tool name (e.g., Met Office Github Copilot Enterprise,
    Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the
    Simulation Systems AI policy
    (including attribution labels)

Documentation

  • Where appropriate I have updated documentation related to this change and
    confirmed that it builds correctly

PSyclone Approval

  • If you have edited any PSyclone-related code (e.g. PSyKAl-lite, Kernel
    interface, optimisation scripts, LFRic data structure code) then please
    contact the
    tooscollabdevteam@metoffice.gov.uk

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

Please alert the code reviewer via a tag when you have approved the SR

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • CLA compliance has been confirmed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Documentation is complete and accurate
  • Security considerations have been addressed
  • Performance impact is acceptable

@EdHone EdHone marked this pull request as draft January 21, 2026 09:49
@EdHone EdHone marked this pull request as ready for review January 21, 2026 10:42
Copy link
Collaborator

@MatthewHambley MatthewHambley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumed code owner review: The "allow everything" argument is a bit over broad but for a demo application and until we can work out how we actually want to handle the issue of "sleep", I am content.

Copy link
Collaborator

@andrewcoughtrie andrewcoughtrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks fine to me. As mentioned in person could you open an issue to create a sleep function that wraps around C usleep or similar.

@EdHone
Copy link
Contributor Author

EdHone commented Jan 23, 2026

This all looks fine to me. As mentioned in person could you open an issue to create a sleep function that wraps around C usleep or similar.

Done - #241

@EdHone
Copy link
Contributor Author

EdHone commented Feb 2, 2026

I've just added 2 more commits which just change some of the rose-stem infrastructure around the tests:

  • to copy the vernier output to the task output dir
  • to only output a single file from vernier

I don't think these changes should require further science review, so I'll pass over to @mo-lucy-gordon for CR

Copy link
Collaborator

@james-bruten-mo james-bruten-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird indenting, but otherwise rose-stem is all fine

'test -f $CYLC_TASK_WORK_DIR/timer.txt && '~
'cp $CYLC_TASK_WORK_DIR/timer.txt $TASK_OUTPUT_DIR || true'
'cp $CYLC_TASK_WORK_DIR/timer.txt $TASK_OUTPUT_DIR || true',
'test -f $CYLC_TASK_WORK_DIR/vernier-output* && '~
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some weird indenting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks better in the full file, promise! Also follows the pattern from the other parts of the file

Comment on lines 98 to 101
type(namelist_type), pointer :: io_nml

io_nml => modeldb%configuration%get_namelist('io')
call io_nml%get_value('diagnostic_frequency', diagnostic_frequency)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type(namelist_type), pointer :: io_nml
io_nml => modeldb%configuration%get_namelist('io')
call io_nml%get_value('diagnostic_frequency', diagnostic_frequency)
diagnostic_frequency = modeldb%config%io%diagnostic_frequency()

@mo-rickywong
Copy link
Contributor

New config_type is on main, so bringing up to head of main will show these changes. Please access the new namelist variables in a similar manner.

@EdHone EdHone force-pushed the 216-iodemo-bench-vernier branch from 6205f6e to 2974558 Compare February 4, 2026 15:09
@EdHone EdHone requested a review from mo-rickywong February 4, 2026 19:29
@EdHone
Copy link
Contributor Author

EdHone commented Feb 4, 2026

I've addressed all your comments @mo-rickywong, and rebased the branch up the head of main

@mo-rickywong
Copy link
Contributor

One other, thing, does this need an upgrade-macro? @james-bruten-mo

!=======================================================================
if (multifile_io) then
files_init_ptr => null()
if(multifile_io) then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(multifile_io) then
if (multifile_io) then

@james-bruten-mo
Copy link
Collaborator

One other, thing, does this need an upgrade-macro? @james-bruten-mo

Thanks Ricky - I think I've discussed this one with Ed before. Technically it should have an upgrade macro, but as it's only in io_demo, then it's probably ok - I imagine no one is making a standalone io_demo suite!

Copy link
Collaborator

@stevemullerworth stevemullerworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code owner review: all fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IO_Demo benchmark configuration

6 participants